export default {
    namespaced: true,
    state: () => ({
        merNo: "S0000260",
        storeNo: "D00000426",
        platCode: "sjxzl5692",
        tempLinkSysUserId: "",
        tempStoreNo: "",
        shopInfo: {},
    }),
    mutations: {
        SET_USER_ACCOUNT(state, account = {}) {
            state.account = account;
            uni.setStorageSync("account", account);
        },
        CLEAR_USER_ACCOUNT(state) {
            state.account = {};
            uni.removeStorageSync("account");
            uni.removeStorageSync("userInfo");
        },
        SET_TEMP_LINK_SYS_USERID(state, tempLinkSysUserId) {
            state.tempLinkSysUserId = tempLinkSysUserId;
            uni.setStorageSync("tempLinkSysUserId", tempLinkSysUserId);
        },
        SET_TEMP_STORE_NO(state, tempStoreNo) {
            state.tempStoreNo = tempStoreNo;
        },
        SET_SHOP_INFO(state, shopInfo) {
            state.shopInfo = shopInfo;
            uni.setStorageSync("shopInfo", shopInfo);
        },
    },
};
